<template>
    <div class="app_goods_detail">
        <div class="group" v-if="user.isgroup && user.group.user_number>10">
            <div class="brokerage">总佣金:<span v-text="parseInt(info.single_brokerage*100)/100"></span></div>
            <div class="task_number">任务数:{{info.current_task_number}}/{{info.total_task_number}} 奖励积分:{{info.single_integral}}</div>
            <div class="btn" @click="group_remove()" v-if="isjoin">移除我的群</div>
            <div class="btn" @click="group_add()" v-if="!isjoin">加入我的群</div>
        </div>
        <div id="top">
            <div class="pic">
                <img v-if="info.goods_pic" :src="resurl+info.goods_pic+'?x-oss-process=image/resize,m_fill,w_750,h_400'" alt="">
            </div>
            <div id="info">
                <div class="name">{{info.goods_name}}</div>
                <div class="price">￥{{info.price}}</div>
                <div class="sales">库存:{{info.goods_number}} 销量:{{info.goods_sales}}</div>
                <div class="number">满团人数:{{info.current_number}}/{{info.number}}</div>
                <div class="endtime" v-html="info.endtime_str"></div>

            </div>
        </div>

        <div class="userlist" v-if="user_list.length>0">
            <div class="title">--购买用户--</div>
            <div class="piclist">
                <div class="headpic" v-for="(item,index) in user_list"><img :src="resurl+item.avatar" alt=""></div>
            </div>
        </div>
        <div class="detail">
            <div class="title">--商品详情--</div>
            <div class=" raic-text" v-html="info.goods_detail"></div>
        </div>
        <div class="bottom">
            <div class="home_btn">
                <router-link to="/" class="btn">
                    <i class="icon iconfont icon-shouye"></i>
                    <span>首页</span>
                </router-link>
            </div>
            <div @click="buy()" class="buy_btn">立即团购</div>
        </div>
    </div>
</template>
<style lang="less">
    .endtime {
        position:relative;
        font-size: 14px;
        color: #F66;
        line-height: 20px;
        span {
            display: inline-block;
            background: #F66;
            border-radius: 5px;
            width: 20px;
            height: 20px;
            color: #FFF;
            text-align: center;
        }
    }
</style>
<script src="./main.js"></script>
<style lang="less" src="./main.less" scoped></style>
